package com.example.liliangwei.topnewslearn.tool;

import android.app.Activity;
import android.hardware.display.DisplayManager;
import android.util.DisplayMetrics;

/**
 * Created by Administrator on 2015/12/1.
 */
public class BaseTools {
    public final static int getWindowWidth(Activity activity){
        DisplayMetrics dm = new DisplayMetrics();
        activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
        return dm.widthPixels;
    }
}
